﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace Sistema_de_Taller.Common_Files
{
    public class Connection
    {
        public static String ConnectionString = "Server=(local);Initial Catalog=SilgradaDB;Integrated Security=true";

        public static SqlConnection OpenConecction()
        {
            SqlConnection Connection = new SqlConnection(Common_Files.Connection.ConnectionString);
            Connection.Open();
            return (Connection);
        }

        public static void CloseConecction(SqlConnection Connection, SqlCommand Command)
        {
            Command.ExecuteNonQuery();
            Connection.Close();
        }
    }
}